package cn.com.cifi.mars.service;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.baomidou.mybatisplus.extension.service.IService;

import cn.com.cifi.mars.bean.vo.price.ApprovedDiffDetailVO;
import cn.com.cifi.mars.bean.vo.price.DifferenceReviewVersionVO;
import cn.com.cifi.mars.bean.vo.price.GroupPriceDetailVO;
import cn.com.cifi.mars.bean.vo.price.GroupPriceVersionListVO;
import cn.com.cifi.mars.bean.vo.price.PriceCompareBasicInfoVO;
import cn.com.cifi.mars.bean.vo.price.PriceCompareVersionIdsVO;
import cn.com.cifi.mars.bean.vo.price.PriceNewestVersion;
import cn.com.cifi.mars.bean.vo.price.PriceSelectItemVO;
import cn.com.cifi.mars.bean.vo.price.PriceVersionListVO;
import cn.com.cifi.mars.bean.vo.price.req.PriceWarPlanReqParam;
import cn.com.cifi.mars.entity.PriceValueOrg;
import cn.com.cifi.mars.entity.PriceVersion;

/**
 * <p>
 * 价格版本表 服务类
 * </p>
 *
 * @author yyd
 * @since 2019-09-09
 */
public interface PriceVersionService extends IService<PriceVersion> {

    PriceSelectItemVO getPriceCastDecisionVersion(String versionId);

    void deletePriceVersion(String versionId, String alias);

    void savePriceCastDecisionVersion(PriceWarPlanReqParam priceWarPlanReqParam, String alias);

    List<PriceVersionListVO> getPriceVersionInfo(String projectFid, String versionType);

    void saveWarPlanPriceVersion(PriceWarPlanReqParam priceWarPlanReqParam, String alias);

    void updateStateById(String versionId, String versionState, String alias,String nowSize,String totalSize);

    void updateStateById(List<String> versionIds, String versionState, String alias);

    PriceNewestVersion priceNewestVersion(String projectFid);

    PriceValueOrg selectViewDataById(String id);

    List<PriceVersion> selectApprovalVersionByFidAndTypesAndStates(String projectFid, List<String> existVersionTypes, List<String> existVersionStates, int key);

    PriceVersion selectNewestVersionByFid(String projectFid, String versionType);

    void saveInfo(PriceVersion newVersion, List<PriceValueOrg> projectList, List<PriceValueOrg> groupInsertList, List<PriceValueOrg> productInsertList, List<PriceValueOrg> buildInsertList, List<PriceValueOrg> hoseSoleList, List<PriceValueOrg> parkSoleList);

    List<PriceCompareBasicInfoVO> priceVersionCompareBasic(String projectId, List<String> versionTypes);

    List<ApprovedDiffDetailVO> priceVersionCompare(List<PriceCompareVersionIdsVO> priceCompareVersionIdsVOs);

    PriceVersion selectByVersionId(String versionId);

    PriceVersion getNewestPriceVersion(String projectFId);

    PriceVersion getNewestPriceVersionAllVersionState(String projectFId);

    String priceVersionValidated(String versionId);

    PriceVersionListVO priceVersionDetail(String versionId);

    void priceVersionAssessmentLable(String versionId);

    PriceVersion selectNewestVersionByFidAndDate(String projectFid, List<String> versionTypes, List<String> versionStates, int isDel, LocalDateTime now);

    PriceVersion selectNewestDynamicToMonthByPrice(String projectFid, String versionType, LocalDate ascriptionDate, int isDel);

    void priceFinalizationToProjectAndTime(String stageId, String finalizationTime);

    void priceExcelExport(String versionId, HttpServletRequest request, HttpServletResponse response);

    DifferenceReviewVersionVO valueDifferenceReview(String code, List<PriceCompareVersionIdsVO> priceCompareVersionIdsVOs);

    void updateAfterAscriptionVersion(PriceVersion notFinishVersion, LocalDateTime afterNow, LocalDate afterAscriptionDate);

    void refreshSaveInfo(PriceVersion oldPriceVersion, List<PriceValueOrg> projectList, List<PriceValueOrg> groupInsertList, List<PriceValueOrg> productInsertList, List<PriceValueOrg> buildInsertList, List<PriceValueOrg> hoseSoleList, List<PriceValueOrg> sortParkList, LocalDateTime now);

    PriceVersion selectById(String versionId);

	String selectArea(String versionId, String collectType);

	List<GroupPriceVersionListVO> selectGroupPriceVersionList(String projectId);
	
	List<GroupPriceDetailVO> selectGroupPriceVersion(String versionId);


}
